//Wrapper for EE::MeshPart
#pragma once
#include "stdafx.h"
#include "string.h"

namespace EsenthelNet
{
	///<summary>Mesh Base + Mesh Render</summary>
	public ref class MeshPart {
	internal:
		MeshPart(EE::MeshPart* p) {
			part = p;
		}
		EE::MeshPart* part;
	public:
		MeshPart() { part = new EE::MeshPart(); }
		~MeshPart() { part->del(); delete part; }

		///<summary>If has any data</summary>
		PropMetGet(bool, Is, part->is)
		property System::String^ Name { System::String^ get() { return gcnew System::String(part->name); } void set(System::String^ value) { char* val = ToEEStr(value); strcpy_s(part->name, val); delete val; } }

		///<summary>Gets material[0], it returns only the first material!!</summary>
		property EsenthelNet::Material^ MaterialOne {
			EsenthelNet::Material^ get() {
				return gcnew EsenthelNet::Material(*part->material(0));
			}
		}
		
	};
}